//webpack Dev Server 配置 http://webpack.github.io/docs/webpack-dev-server.html
const Parame = require('./constants');
const moment = require('moment');
moment.locale('en');
module.exports = {
  host: '0.0.0.0',
  compress: false, //true为开启gzip
  quiet: true, //安静模式。不输出任何日志到命令行界面
  clientLogLevel: 'none',
  contentBase: Parame.distPath,
  inline: true,
  historyApiFallback: true,
  stats: {
    colors: true,
    progress: true
  },
  headers:{
    'X-Custom-Header': `NowTime:=:>${moment().format('llll')}`,
    'Access-Control-Allow-Origin': '(-_-)', //可不设
  },
  proxy: {
    '/yj_1/*': {
      target: 'http://localhost/yj_1',
      secure: false,
      pathRewrite: {'^/yj_1' : ''}
    }
  },
  hot: true,
  port: Parame.devPort,
  publicPath: Parame.publicPath,
  noInfo: false
};
